package com.outsource.framework.model.services.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.outsource.framework.domain.Thaoduan;
import com.outsource.framework.model.repository.ThaoduanRepository;
import com.outsource.framework.model.services.ThaoduanService;

@Service
public class ThaoduanServiceImpl implements ThaoduanService{

	@Autowired
	ThaoduanRepository repository;

	@Override
	public Thaoduan findByAttribution(String mobile) {
		// TODO Auto-generated method stub
		return repository.findByAttribution(mobile);
	}

	@Override
	public Thaoduan save(Thaoduan entity) {
		// TODO Auto-generated method stub
		return repository.save(entity);
	}

	@Override
	public Thaoduan getById(Integer id) {
		// TODO Auto-generated method stub
		return repository.getById(id);
	}

	@Override
	public void update(Thaoduan dto) {
		// TODO Auto-generated method stub
		repository.save(dto);
	}

	@Override
	public String findLocation(String code) {
		// TODO Auto-generated method stub
		return repository.findLocation(code);
	}

	 
}
